package org.pp.admin.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import org.pp.entity.PpGoodsAttr;

import java.util.List;

@Setter
@Getter
public class PpGoodsAttrEdite {

    @Setter
    @Getter
    public static  class Attr{
        @Schema(description = "属性Id")
        private Long attrId;

        @Schema(description = "商品id")
        private Long goodsId;

        @Schema(description = "属性名称")
        private String name;

        @Schema(description = "属性可选值，字符串的jsonArray")
        @TableField(typeHandler = JacksonTypeHandler.class)
        private String[] vals;

    }

    @Schema(description = "商品id")
    private Long goodsId;

    List<Attr> attrs;
}
